package org.wxd.category.api.dto;

import java.io.Serializable;
import java.util.Map;

/**
 * Created by wangxd on 2015/11/14.
 */
public class CategoryAddRequest implements Serializable {
    private static final long serialVersionUID = 6857775561841581384L;

    private String name;
    private String pId;
    private Map<String,String> moreInfo;

    CategoryAddRequest(String name,Map<String, String> moreInfo){
        this.name = name;
        this.moreInfo = moreInfo;
    }

    CategoryAddRequest(String name,String pId,Map<String, String> moreInfo){
        this.name = name;
        this.pId = pId;
        this.moreInfo = moreInfo;
    }
    public static CategoryAddRequest buildeParentCategory(String name,Map<String,String> moreInfo){
        return new CategoryAddRequest(name,moreInfo);
    }

    public static CategoryAddRequest buildeChildCategory(String name,String pId,Map<String,String> moreInfo){
        return new CategoryAddRequest(name,pId,moreInfo);
    }

    public String name() {
        return name;
    }

    public String pId() {
        return pId;
    }

    public Map<String, String> moreInfo() {
        return moreInfo;
    }
}
